<template>
  <el-card class="common-card">
    <div class="card-title">{{title}}</div>
    <div class="card-value">{{value}}</div>
    <div class="card-chart">
        <slot></slot>
    </div>
    <div class="card-line"></div>
    <div class="card-footer">
        <slot name="footer"></slot>
    </div>
  </el-card>
</template>

<script>
export default {
    name:'CommonCard',
    props:{
        title:{
            type:String,
            default:''
        },
        value:{
            type:String,
            default:''
        }
    }
}
</script>

<style lang="scss" scoped>
.common-card {
  .card-title{
    font-size:12px;
    color:#999;
  }
  .card-value {
    font-size:24px;
    color:#000;
    margin:5px 0;
    letter-spacing: 1px;
  }
  .card-chart {
    height: 50px;
  }
  .card-line {
    border-bottom:1px solid #ccc;
    margin: 10px 0;
  }
  .card-footer {
    font-size:12px;
    color:#666;
    // 1. 可以使用深度选择器,将当前组件的子内容进行样式的设置
    // :deep(.emphasis) {
    //   font-weight: 600;
    //   color:red;
    // }
  }

 
}
</style>